﻿namespace NoIdeaIoc;
/// <summary>
/// 路由配置
/// </summary>
public class RouteConfig
{
    /// <summary>
    /// 路由名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// Area名称
    /// </summary>
    public string AreaName { get; set; }
    /// <summary>
    /// 路由模板
    /// </summary>
    public string Pattern { get; set; }
    /// <summary>
    /// 默认值
    /// </summary>
    public object Defaults { get; set; }
    /// <summary>
    /// 约束
    /// </summary>
    public object Constraints { get; set; }
    /// <summary>
    /// DataTokens
    /// </summary>
    public object DataTokens { get; set; }
    /// <summary>
    /// 默认值
    /// </summary>
    public static RouteConfig GetDefault() => new RouteConfig
    {
        Name = "default",
        Pattern = "api/{controller=Home}/{action=Index}"
    };
}